<template>
  <div id="app">
    <div class="wrap">
      <div id="uniLogin"></div>
    </div>
  </div>
</template>

<script>
import jsSDK from "@/jsSDK/index.js"

export default {
  name: 'App',
  mounted() {
    console.log('> mounted')
    console.log(jsSDK.instance)
    /* eslint-disable */
    jsSDK.init({
        el: "#uniLogin",
        mode: process.env.VUE_APP_SERVER_ENV,
        // mode: 'Europe',
        // WEB端传A0001, 客户端传A0002
        app_key: 'A0001',
        // app_key: 'A0002',
        // 网页平台 pc/mobile 默认pc
        platform: 'pc',
        // platform: 'mobile',
        // 场景值：website 网站、member 会员中心、client 游戏客户端
        scene: 'website',
        // scene: 'client',
        from: '',
        // channel_ad_id: '123',
        // language: 'en-us',
        // language: 'in-id',
        language: 'zh-hk',
        share_code: 'share_code_10000',
        // language: 'tr-tr',
        // language: 'zh-cn',
        show_download: false,
        // 登录成功
        loginSuccess: (data) => {
          console.log('> 登录成功 ');
          console.log(data);
        },
        thirdLogin: (data) => {
          console.log('> 调用三方登录');
          console.log(data);
        },
      },
      function () {
        console.log("初始化完成");
      })
  }
}
</script>

<style scoped lang="scss">
#app {
}

.wrap {
  padding-top: 60px;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}
</style>
<style>
body {
  margin: 0;
  padding: 0 10px;
  min-height: 100vh;
  background-color: #eee;
}
</style>
